package com.champ.thread;

public class SleepTread extends Thread {

	@Override
	public void run() {
		try {
			System.out.println("run begin");
			Thread.sleep(202020);
			System.out.println("run end");
		} catch (InterruptedException e) {
			System.out.println("线程进入catch "+this.isInterrupted());
			e.printStackTrace();
		}
		super.run();
	}
	
}

class SleepThreadU extends Thread {

	@Override
	public void run() {
		
		super.run();
		try {
			for (int i = 0; i < 10101010; i++) {
				System.out.println("i = "+ i);
			}
			this.sleep(2000);
			
		} catch (InterruptedException e) {
			System.out.println("先停止，在遇到了Sleep！ 进入catch！");
			e.printStackTrace();
		}
	}
	
}
